package cn.jinjimi.app.bean;


import cn.jinjimi.app.BuildConfig;
import cn.jinjimi.base.util.DateUtils;

/**
 * 常量
 *
 * @author
 * @date
 */
public class Constants {

    /**
     * 开发环境配置信息
     */
    public static boolean DEV_MODE = false;

    /**
     * 默认第一页起始序号
     */
    public static final int DEFAULT_PAGE = 1;

    public final static int PAGE_LIMIT_10 = 10;
    public final static int PAGE_LIMIT_20 = 20;
    public static final String COVER = "cover";
    public static final String IS_VIP = "1";
    public static final String ZERO = "0";
    public static final int REMIND_TYPE_BIRTHDAY = 0;
    public static final int HONOR_MAX_NUM = 5;
    public static final float HONOR_ASPECT_RATIO = 3 / 4f;
    public static final int MAX_VALUE_PHOTOS = 9;
    public final static int PROGRESS_MAX = 100;
    public final static int HALF_SECOND = 500;
    public static final long SECOND_5 = 5 * 1000;
    public static final long MIN_1 = 60 * 1000;
    public static final long HOUR_1 = 60 * MIN_1;
    public static final long MIN_10 = 10 * MIN_1;
    public static final long DAY_15 = 15 * DateUtils.TimeSpan.TIME_DAY_MILLIS;


    public interface OtherPlatform {
        String WX_APP_ID = BuildConfig.WX_APP_ID;
        String WX_APP_SECRET = BuildConfig.WX_APP_SECRET;
    }

    public interface Env {
        String WEB_BASE_URL = DEV_MODE ? "http://appt.jinjimi.cn/"
                : "http://app.jinjimi.cn/";
        String API_BASE_URL = DEV_MODE ? "http://apit.jinjimi.cn/api/v1/"
                : "http://api.jinjimi.cn/api/v1/";
    }

    public interface Route {
        String HOME_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.HOME;
        String LOGIN_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.LOGIN;
        String LOGOUT_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.LOG_OUT;
        String HOME_HOT_URL = "jjm://home/hot";
        String DOWNLOAD_URL = "jjm://download/?url=";
        String CUSTOMER_SERVICE_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.CUSTOMER_SERVICE;
        String PRODUCT_SEARCH_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.PRODUCT_SEARCH;

        String CATE_URL = RouterService.ROUTER_HEADER_SHORT + RouterConstants.CATEGORY;
        String VIP_URL = Env.WEB_BASE_URL + "app/index.php?i=5&c=entry&m=ewei_shopv2&do=mobile&r=member.vip";
        String CERT_URL = Env.WEB_BASE_URL + "app/index.php?i=5&c=entry&m=ewei_shopv2&do=mobile&r=member.cart";
        String ME_URL = Env.WEB_BASE_URL + "app/index.php?i=5&c=entry&m=ewei_shopv2&do=mobile&r=member";
        String SEARCH_URL = Env.WEB_BASE_URL + "app/index.php?i=5&c=entry&m=ewei_shopv2&do=mobile&r=goods&keywords=%s";
    }


    public interface BundleKey {
        String LABEL = "bundle_key_label";
        String URL = "bundle_key_url";
        String Q = "bundle_key_q";
    }

    public interface ParamKey {
        String APP_TOKEN = "apptoken";
        String URL = "url";
    }

    public interface Code {
        int RES_SUCCESS = 200;
        int RES_ERROR = 400;

        int CODE_USER_NOT_FOUND = 10000032;
    }

    public interface UriScheme {
        String PAY_WX = "weixin://";

        String HTTP = "http://";
        String HTTPS = "https://";

        String JJM = "jjm://";
        String JJM_FULL = "cn.jinjimi://";
        String JJM_OPEN_IN_NEW = "AppOpenInNewController=1";
    }
}
